package lgs.hm.homework.work3;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Villa {
	
	private Integer size = 1000;
	private String address = "上海";
	private String name = "花园别墅";
	
	@Autowired
	private Servant servant;
	
    public Villa() {}

	public Villa(Integer size, String address,String name) {
		super();
		this.size = size;
		this.address = address;
		this.name = name;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Servant getServant() {
		return servant;
	}

	public void setServant(Servant servant) {
		this.servant = servant;
	}

	@Override
	public String toString() {
		return "Villa [size=" + size + ", address=" + address + ", name=" + name + ", servant=" + servant + "]";
	}
    
    

}
